﻿CREATE TABLE [dbo].[AppAd]
(
	[AppId] INT NOT NULL , 
    [AdId] INT NOT NULL, 
     
    [Location] INT NOT NULL, 
    CONSTRAINT [FK_AppId] FOREIGN KEY ([AppId]) REFERENCES [App]([AppId]), 
    CONSTRAINT [FK_AdId] FOREIGN KEY ([AdId]) REFERENCES [Ad]([AdId]), 
    CONSTRAINT [PK_AppAd] PRIMARY KEY ([AppId], [AdId], [Location]) 
)
